package cn.itcast.bos.dao.base;

import java.io.Serializable;
import java.util.List;

import org.hibernate.criterion.DetachedCriteria;

public interface IBaseDao<T> {

	public void save(T entity);
	
	public void delete(T entity);
	
	public void update(T entity);
	
	public T findById(Serializable id);

	public List<T> findAll();
	
	public List<T> findByCriteria(DetachedCriteria criteria) ;
	
	public List<T> findByNamedQuery(String queryName,Object... args);
	
	public void excuteNamedQuery(String queryName,Object... args);
	
	public void excuteUpdate(String hql,Object... args);
	
}
